FROM python:3.12
WORKDIR /app
COPY requirements.txt .

RUN pip install --upgrade pip && \
    pip install --no-cache-dir -r requirements.txt && \
    pip install torch torchvision --index-url https://download.pytorch.org/whl/cu130 && \
    pip install opencv-python-headless && \
    mkdir -p /app/models /app/datas
COPY . .
EXPOSE 6789
VOLUME ["/app/model","/app/datas"]
CMD ["python","main.py"]